OBJS	= 
AS	= ml
AFLAGS	= /Zi /Zd /c /nologo
LN	= link
LFLAGS	= /CODEVIEW /NOLOGO
CV	= cv
REMOVE	= del
OBJ_F	= tmp\	#tmp folder
MAKE	= nmake /NOLOGO

default: main.exe
	@echo "[== COMPLETE ==]"

main.exe: main.asm $(OBJ_F)txtio.obj $(OBJ_F)txtwin.obj $(OBJ_F)fileio.obj
	$(AS) $(AFLAGS) /Fo$(OBJ_F)main main.asm
	$(LN) $(LFLAGS) $(OBJ_F)main.obj+$(OBJ_F)txtio.obj+$(OBJ_F)txtwin.obj+$(OBJ_F)fileio.obj,main;

$(OBJ_F)txtio.obj: monitor\txtio.asm
	$(AS) $(AFLAGS) /Fo$(OBJ_F)txtio monitor\txtio.asm
$(OBJ_F)txtwin.obj: monitor\txtwin.asm
	$(AS) $(AFLAGS) /Fo$(OBJ_F)txtwin monitor\txtwin.asm
$(OBJ_F)fileio.obj: file\fileio.asm
	$(AS) $(AFLAGS) /Fo$(OBJ_F)fileio file\fileio.asm

clean:
	@$(REMOVE) $(OBJ_F)*.obj
	@$(REMOVE) *.exe
	@echo "[== CLEAN ==]"
